package messagesPacks;

import java.util.ArrayList;
import messagesPacks.GenericMessage.msgType;
import Entity.Book;


public class SubscriberSearchBookMassege extends GenericMessage
{
	
	private static final long serialVersionUID = 1L;
	
	private String freeText ;
	private Book book;
	private int queryResult ; 
	
	public ArrayList<Book> result_books  ; 
	
	public SubscriberSearchBookMassege()
	{
		this.type = msgType.SubscriberSearchBookMSG;
		this.freeText = ("");
		this.book = new Book();
		this.queryResult = -10 ;
		this.result_books = new ArrayList<Book>();  
	}
	
	public SubscriberSearchBookMassege(String Freetext , Book BOOK ,ArrayList<Book> books )
	{
	  this.type = msgType.SubscriberSearchBookMSG;
	  this.freeText = Freetext ; 
	  this.book = BOOK;
	  this.result_books = new ArrayList<Book>(); 
	  this.result_books.addAll(books);
	
	}
	
//===================================================================	
//                  Getters & Setters
//===================================================================	
	
	public String getFreeText() 
	{
		return freeText;
	}

	public void setFreeText(String freeText) 
	{
		this.freeText = freeText;
	}

 public Book getBook()
	{
		return book;
	}

	public void setBook(Book book)
	{
		this.book = book;
	}

	public int getQueryResult() 
	{
		return queryResult;
	}

	public void setQueryResult(int queryResult) 
	{
		 this.queryResult = queryResult;
	}

	public ArrayList<Book> getResult_books() 
	{
		return this.result_books;
	}

	public void setResult_books(ArrayList<Book> books) 
	{
		this.result_books.addAll(books);
	}


}//class
